<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link type="text/css" rel="stylesheet" th:href="@{/css/main.css}" />
</head>
<body class="goodsBody">


<h3 th:text="${goodsModel.title}"></h3>
<div>
    <a th:href="@{/wujin/formpage}">新增商品</a>
</div>
<br>
<br>
<table border="1">
    <thead>
    <tr>
        <td>商品ID</td>
        <td>商品名称</td>
        <td>商品价格</td>
        <td>商品类型</td>
        <td>商品热度</td>
        <td>商品新旧</td>

    </tr>
    </thead>
    <tbody>
    <tr th:if="${goodsModel.goodsList.size()} eq 0">
        <td colspan="3">没有商品信息！</td>
    </tr>
    <tr th:each="goods:${goodsModel.goodsList}">
        <td th:text="${goods.goods_id}"></td>
        <td th:text="${goods.goods_name}"></td>
        <td th:text="${goods.goods_price}"></td>
        <td th:text="${goods.goods_type}"></td>
        <td th:text="${goods.goods_hot}"></td>
        <td th:text="${goods.goods_new}==1? '新品':'旧品' "></td>
        <td >
            <a th:href="@{'/wujin/'+${goods.goods_id}}">查看详情</a>
        </td>
        <td>
            <a th:href="@{'/wujin/delete/'+${goods.goods_id}}">删除</a>
        </td>
        <td >
            <a th:href="@{'/assist/listcol?goods_id='+${goods.goods_id}}">颜色</a>
            <a th:href="@{'/assist/listpitch?goods_id='+${goods.goods_id}}">孔距</a>
            <a th:href="@{'/assist/listscrew?goods_id='+${goods.goods_id}}">螺丝</a>
            <a th:href="@{'/assist/image?goods_id='+${goods.goods_id}}">图片</a>
        </td>
    </tr>
    </tbody>
</table>

</body>
</html>